import { Get, Post } from "@/library/utils/request";

/**
 * Operator - API请求地址
 */
export const OperatorApiUrl = {
  GetInfo: "/Operator/GetInfo",
  GetMenuTree: "/Operator/GetMenuTree",
  UpdatePassword: "/Operator/UpdatePassword",
  Logout: "/Operator/Logout"
}

export const OperatorApi = {
  GetInfo: (param: object) => {
    return Get(OperatorApiUrl.GetInfo);
  },
  /** 获取菜单 */
  GetMenuTree: () => {
    return Get(OperatorApiUrl.GetMenuTree);
  },
  /** 修改密码 */
  UpdatePassword: (param: object) => {
    return Post(OperatorApiUrl.UpdatePassword, param);
  },
  /** 退出登录 */
  Logout: () => {
    return Get(OperatorApiUrl.Logout);
  }
}